﻿
<div ng-controller="StaffController">
    <div class="mb20 clearfix">
        <h3>Staff list</h3>
        <button ng-click="createNew()">{{texts['btn-create-new']}}</button>
    </div>
    <div class="mb10 clearfix">
        <ul class="listNgang fleft">
            <li>
                <span class="pd5">{{texts['lb-store']}}:</span>
            </li>
            <li class="mr30">
                <select class="CBB w110" ng-model="myStore">
                    <option value="">All store</option>
                    <option ng-repeat="store in rowsStoreList" value="{{ store.Name }}">{{store.Name}}</option>
                </select>
            </li>
            <li>
                <input name="WorkingStatus" checked="checked" type="radio" value="1" ng-model="myRadioFilter.WorkingStatus" />{{texts['lb-working']}}
                <input name="WorkingStatus" type="radio" value="2" ng-model="myRadioFilter.WorkingStatus"/>{{texts['lb-quit']}}
                <input name="WorkingStatus" type="radio" value="3" ng-model="myRadioFilter.WorkingStatus"/>{{texts['lb-retired']}}
            </li>
        </ul>
        <ul class="listNgang mr30 fright">
            <li>
                <input type="text" ng-model="myFilterInput"/> <button>{{texts['btn-search']}}</button>
            </li>
        </ul>
    </div>
    <div class="clearfix">
        <table class="tableKind-01 table-StaffList w760" >
            <tr>
                <th>{{texts['lb-staff-id']}}</th>
                <th>{{texts['lb-staff-name']}}</th>
                <th>{{texts['lb-name-kata']}}</th>
                <th>{{texts['lb-contract-type']}}</th>
                <th>{{texts['lb-store-name']}}</th>
                <th>{{texts['lb-edit']}}</th>
            </tr>
            <tr ng-repeat="row in staffRowsData | filter : myStore | filter : myRadioFilter | filter : myFilterInput">
                <td>{{row.Id}}</td>
                <td>{{row.Name}}</td>
                <td>{{row.NameKana}}</td>
                <td>{{row.ContractType == 1 ?"Staff":row.ContractType == 2?"Contract Staff":row.ContractType == 3 ?" Part staff":"Part Time staff"}}</td>
                <td>{{row.StoreNames}}</td>
                <td ng-click="edit(row.Id)"><button class="w70px">{{texts['lb-edit']}}</button></td>
            </tr>
        </table>
    </div>
</div>
